from django.db import models

# Create your models here.

class MailModel(models.Model):
    e_mail = models.CharField(verbose_name="邮箱",max_length=20)
    class Meta:
        db_table = "p7_day01_mail"
        verbose_name_plural = "邮箱表"
    def __str__(self):
        return self.e_mail



class UserModel(models.Model):
    user = models.CharField(verbose_name="用户名",max_length=20)
    password = models.CharField(verbose_name="密码",max_length=20)
    tel = models.CharField(verbose_name="手机号",max_length=20)
    # e_mail = models.ForeignKey(to=MailModel,on_delete=models.CASCADE,verbose_name="邮箱")
    class Meta:
        db_table = 'p7_day01_user'
        verbose_name_plural = "用户表"
    def __str__(self):
        return self.user
